﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminPanel/AdminSite.Master" AutoEventWireup="true"
CodeBehind="Report.aspx.cs" Inherits="FastTrackCabService.AdminPanel.Report" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Fast Track | Report</title>
    <link href="../Style/Report.css" rel="stylesheet" type="text/css"/>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <div class="reportSubsidiary">
                <asp:DropDownList ID="ddlOrder" CssClass="select" runat="server">
                    <asp:ListItem Selected="True" Value="Top">Top</asp:ListItem>
                    <asp:ListItem Value="Bottom">Bottom</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="ddlCount" CssClass="select" runat="server">
                    <asp:ListItem Selected="True" Value="5">5</asp:ListItem>
                    <asp:ListItem Value="10">10</asp:ListItem>
                    <asp:ListItem Value="15">15</asp:ListItem>
                    <asp:ListItem Value="20">20</asp:ListItem>
                    <asp:ListItem Value="25">25</asp:ListItem>
                </asp:DropDownList>
                <b>subsidiaries which have hired out most number of vehicles for last</b>
                <asp:DropDownList ID="ddlDays" CssClass="select" runat="server">
                    <asp:ListItem Selected="True" Value="30">30 days</asp:ListItem>
                    <asp:ListItem Value="60">60 days</asp:ListItem>
                    <asp:ListItem Value="90">90 days</asp:ListItem>
                    <asp:ListItem Value="180">180 days</asp:ListItem>
                    <asp:ListItem Value="365">1 year</asp:ListItem>
                </asp:DropDownList>
                <br/>
                <asp:Button ID="btnReport1" runat="server" Text="Generate Report" OnClick="btnReport1_OnClick"
                            CssClass="btnReport"/>
                <asp:Button ID="btnHide" runat="server" Text="Hide Report" OnClick="btnHide_OnClick"
                            CssClass="btnReport"/>
                <br/>
                <br/>
                <asp:Panel runat="server" ID="panelReport1" BackColor="whitesmoke">
                    <br/>
                    <asp:DropDownList ID="ddlReportChart1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlReportChart1_OnSelectedIndexChanged"
                                      CssClass="select"/>
                    <br/>
                    <br/>
                    <asp:Chart ID="chart1" runat="server" Palette="EarthTones">
                        <Titles>
                            <asp:Title Text="Hire reports of subsidiaries">
                            </asp:Title>
                        </Titles>
                        <Series>
                            <asp:Series Name="Series">
                            </asp:Series>
                        </Series>
                        <ChartAreas>
                            <asp:ChartArea Name="ChartArea">
                            </asp:ChartArea>
                        </ChartAreas>
                    </asp:Chart>
                    <br/>
                </asp:Panel>
            </div>
            <hr style="border: 1px solid black"/>
            <div class="reportSubsidiary">
                <b>Get report by customer id</b>
                <br/>
                <br/>
                <asp:TextBox ID="txtCusId" min="1" runat="server" placeholder="Customer ID" CssClass="myTextBox"
                             TextMode="Number">
                </asp:TextBox>
                <asp:Button ID="btnReport2" runat="server" Text="Generate Report" CssClass="btnReport"
                            OnClick="btnReport2_OnClick"/>
                <asp:Button ID="btnHide2" runat="server" Text="Hide Report" CssClass="btnReport"
                            OnClick="btnHide2_OnClick"/>
                <br/>
                <br/>
                <asp:Panel runat="server" ID="panelReport2" CssClass="panel">
                    <asp:GridView ID="DGVCustomer" runat="server" AutoGenerateColumns="False" BackColor="LightGoldenrodYellow"
                                  BorderColor="Tan" BorderWidth="0" CellPadding="2" ForeColor="Black" GridLines="None"
                                  PageSize="25" CssClass="DGV" AllowPaging="True" OnPageIndexChanging="DGVCustomer_OnPageIndexChanging">
                        <AlternatingRowStyle BackColor="PaleGoldenrod"/>
                        <Columns>
                            <asp:BoundField DataField="Type" HeaderText="Type"/>
                            <asp:BoundField DataField="Trip Date &amp; Time" HeaderText="Trip Date&amp;Time"/>
                            <asp:BoundField DataField="From" HeaderText="From"/>
                            <asp:BoundField DataField="To" HeaderText="To"/>
                            <asp:TemplateField HeaderText="Returned Date & Time">
                                <ItemTemplate>
                                    <%# (string.IsNullOrEmpty(Eval("ReturnedDate").ToString()) ? "-" : Eval("ReturnedDate")) %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Status" HeaderText="Status"/>
                        </Columns>
                        <FooterStyle BackColor="Tan"/>
                        <HeaderStyle BackColor="Tan" Font-Bold="True"/>
                        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center"/>
                        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite"/>
                        <SortedAscendingCellStyle BackColor="#FAFAE7"/>
                        <SortedAscendingHeaderStyle BackColor="#DAC09E"/>
                        <SortedDescendingCellStyle BackColor="#E1DB9C"/>
                        <SortedDescendingHeaderStyle BackColor="#C2A47B"/>
                    </asp:GridView>
                </asp:Panel>
            </div>
            <hr style="border: 1px solid black"/>
            <div class="reportSubsidiary">
                <b>Get report about inactive customers</b>
                <br/>
                <br/>
                <asp:DropDownList ID="ddlNumberOfDays" runat="server" CssClass="select">
                    <asp:ListItem Selected="True" Value="30">30 days</asp:ListItem>
                    <asp:ListItem Value="60">60 days</asp:ListItem>
                    <asp:ListItem Value="90">90 days</asp:ListItem>
                    <asp:ListItem Value="100">100 days</asp:ListItem>
                    <asp:ListItem Value="365">1 year</asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="btnReport3" runat="server" Text="Generate Report" CssClass="btnReport" OnClick="btnReport3_OnClick"/>
                <asp:Button ID="btnHide3" runat="server" Text="Hide Report" CssClass="btnReport"
                            OnClick="btnHide3_OnClick"/>
                <br/>
                <br/>
                <asp:Panel runat="server" ID="panelReport3" CssClass="panel">
                    <asp:GridView ID="DGVInactiveCustomer" runat="server" AutoGenerateColumns="True"
                                  BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="0" CellPadding="2"
                                  ForeColor="Black" GridLines="None" PageSize="25" CssClass="DGV" AllowPaging="True"
                                  OnPageIndexChanging="DGVInactiveCustomer_OnPageIndexChanging">
                        <AlternatingRowStyle BackColor="PaleGoldenrod"/>
                        <FooterStyle BackColor="Tan"/>
                        <HeaderStyle BackColor="Tan" Font-Bold="True"/>
                        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center"/>
                        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite"/>
                        <SortedAscendingCellStyle BackColor="#FAFAE7"/>
                        <SortedAscendingHeaderStyle BackColor="#DAC09E"/>
                        <SortedDescendingCellStyle BackColor="#E1DB9C"/>
                        <SortedDescendingHeaderStyle BackColor="#C2A47B"/>
                    </asp:GridView>
                </asp:Panel>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>